package models;


public class Tester {

	public static void main(String[] args) {
		Table mytable;
		
		mytable = new Table("Andrzej","Zbyszek","Ania","Olaf",false,false,false,false,300,10);
		
		mytable.start();
		
		System.out.println(mytable.currentPlayer);
		
		mytable.playerLeave(mytable.currentPlayer+1);

		mytable.move(mytable.currentPlayer,(byte)1,1);
		mytable.endTurn(mytable.currentPlayer);
		
		System.out.println(mytable.currentPlayer);
		
		mytable.move(mytable.currentPlayer,(byte)4,1);
		mytable.endTurn(mytable.currentPlayer);
		
		System.out.println(mytable.currentPlayer);
		
		mytable.move(mytable.currentPlayer,(byte)4,1);
		mytable.endTurn(mytable.currentPlayer);
		
		System.out.println(mytable.currentPlayer);
		
	//	mytable.move(mytable.currentPlayer, [0,0,0,0,0]);
		mytable.endTurn(mytable.currentPlayer);		

		/*
		mytable.whoseTurn().betTokens(260);
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);		
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1, 50);
		mytable.endTurn(mytable.whoseTurn());		
		mytable.move(mytable.getCurrentPlayer(), (byte)4, 30);		
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)5, 30);		
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)0, 30);		
		mytable.endTurn(mytable.whoseTurn());	
		mytable.move(mytable.getCurrentPlayer(), (byte)5, 30);		
		mytable.endTurn(mytable.whoseTurn());
		
		System.out.println(Integer.toString(mytable.gameStatus));
		
		int wymiana[] = new int[5];

		wymiana[0] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());
		
		wymiana[2] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());*/
		
		/* PATOLOGIA
			
		System.out.println("Pierwsza licytacja");
		System.out.println(Integer.toString(mytable.getCurrentPlayer()));
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4, 30);
		mytable.endTurn(mytable.whoseTurn());
		
		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		
		System.out.println("Wymiana");
		
		//wymiana
		int wymiana[] = new int[5];
		
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());

		wymiana[0] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());
		
		wymiana[2] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());
		

		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(i));
			mytable.players[i].showCards();
		}
		//druga licytacja
		System.out.println("Druga licytacja");
		
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1, 30);
		mytable.endTurn(mytable.whoseTurn());		
		mytable.move(mytable.getCurrentPlayer(), (byte)0, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)0, 30);
		mytable.endTurn(mytable.whoseTurn());

		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.bets[i]));
		}
		
		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		*/
		
		/* ALL IN W 2
		
		System.out.println("Pierwsza licytacja");
		System.out.println(Integer.toString(mytable.getCurrentPlayer()));
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4, 30);
		mytable.endTurn(mytable.whoseTurn());
		
		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		
		System.out.println("Wymiana");
		
		//wymiana
		int wymiana[] = new int[5];
		
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());

		wymiana[0] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());
		
		wymiana[2] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());
		

		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(i));
			mytable.players[i].showCards();
		}
		//druga licytacja
		System.out.println("Druga licytacja");
		
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)5, 30);
		mytable.endTurn(mytable.whoseTurn());		
		mytable.move(mytable.getCurrentPlayer(), (byte)0, 50);
		mytable.endTurn(mytable.whoseTurn());		
		mytable.move(mytable.getCurrentPlayer(), (byte)5, 50);
		mytable.endTurn(mytable.whoseTurn());		
		
		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		*/
		
		/* ALL IN W 1
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)5, 30);
		mytable.endTurn(mytable.whoseTurn());		
		mytable.move(mytable.getCurrentPlayer(), (byte)0, 50);
		mytable.endTurn(mytable.whoseTurn());		
		mytable.move(mytable.getCurrentPlayer(), (byte)5, 50);
		mytable.endTurn(mytable.whoseTurn());		

		mytable.move(mytable.getCurrentPlayer(), (byte)3, 50);
		mytable.endTurn(mytable.whoseTurn());	
		
		for(i = 0; i<3; i++)
		{
			System.out.println(mytable.bets[i]);
		}
		
		System.out.println("Wymiana");
		
		//wymiana
		int wymiana[] = new int[5];
		
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());

		wymiana[0] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());
		
		for(i = 0; i<3; i++)
		{
			System.out.println(mytable.bets[i]);
		}
		
		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		*/
		
		/* Z FOLD
		 * 
		 * 
		System.out.println(Integer.toString(mytable.getCurrentPlayer()));
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)0, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4, 30);
		mytable.endTurn(mytable.whoseTurn());
		
		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		
		System.out.println("Wymiana");
		
		//wymiana
		int wymiana[] = new int[5];
		
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());

		wymiana[0] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());
		
		System.out.println("Druga licytacja");
		
		mytable.move(mytable.getCurrentPlayer(), (byte)2,0);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1,15);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)3,30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4,30);
		mytable.endTurn(mytable.whoseTurn());
		
		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		*/
		
		
		/* BEZ FOLD
		 * 
		 * for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		
		System.out.println("Pierwsza licytacja");
		
		mytable.start();
		System.out.println(Integer.toString(mytable.getCurrentPlayer()));
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)2, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4, 30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4, 30);
		mytable.endTurn(mytable.whoseTurn());
		
		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		
		System.out.println("Wymiana");
		
		//wymiana
		int wymiana[] = new int[5];
		
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());

		wymiana[0] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());
		
		wymiana[2] = 1;
		mytable.whoseTurn().showCards();
		mytable.move(mytable.getCurrentPlayer(), wymiana);
		mytable.endTurn(mytable.whoseTurn());
		

		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(i));
			mytable.players[i].showCards();
		}
		//druga licytacja
		System.out.println("Druga licytacja");
		
		mytable.move(mytable.getCurrentPlayer(), (byte)2,0);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)1,15);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)3,30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4,30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)3,50);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4,30);
		mytable.endTurn(mytable.whoseTurn());
		mytable.move(mytable.getCurrentPlayer(), (byte)4,30);
		mytable.endTurn(mytable.whoseTurn());
		
		for(i = 0; i<3; i++)
		{
			System.out.println(Integer.toString(mytable.players[i].getTokens()));
		}
		*/
	}

}
